package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HouseHostMapper;
import com.ruoyi.system.domain.HouseHost;
import com.ruoyi.system.service.IHouseHostService;
import com.ruoyi.common.core.text.Convert;

/**
 * 房东Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-26
 */
@Service
public class HouseHostServiceImpl implements IHouseHostService 
{
    @Autowired
    private HouseHostMapper houseHostMapper;

    /**
     * 查询房东
     * 
     * @param hostId 房东主键
     * @return 房东
     */
    @Override
    public HouseHost selectHouseHostByHostId(Long hostId)
    {
        return houseHostMapper.selectHouseHostByHostId(hostId);
    }

    /**
     * 查询房东列表
     * 
     * @param houseHost 房东
     * @return 房东
     */
    @Override
    public List<HouseHost> selectHouseHostList(HouseHost houseHost)
    {
        return houseHostMapper.selectHouseHostList(houseHost);
    }

    /**
     * 新增房东
     * 
     * @param houseHost 房东
     * @return 结果
     */
    @Override
    public int insertHouseHost(HouseHost houseHost)
    {
        return houseHostMapper.insertHouseHost(houseHost);
    }

    /**
     * 修改房东
     * 
     * @param houseHost 房东
     * @return 结果
     */
    @Override
    public int updateHouseHost(HouseHost houseHost)
    {
        return houseHostMapper.updateHouseHost(houseHost);
    }

    /**
     * 批量删除房东
     * 
     * @param hostIds 需要删除的房东主键
     * @return 结果
     */
    @Override
    public int deleteHouseHostByHostIds(String hostIds)
    {
        return houseHostMapper.deleteHouseHostByHostIds(Convert.toStrArray(hostIds));
    }

    /**
     * 删除房东信息
     * 
     * @param hostId 房东主键
     * @return 结果
     */
    @Override
    public int deleteHouseHostByHostId(Long hostId)
    {
        return houseHostMapper.deleteHouseHostByHostId(hostId);
    }
}
